home *** CD-ROM | disk | FTP | other *** search
- /*
- File: CDSSpec.h
-
- Contains: xxx put contents here xxx
-
- Written by: Tim Harnett
-
- Copyright: © 1994 by Apple Computer, Inc., all rights reserved.
-
- Change History (most recent first):
-
- <4> 10/14/94 TMH added CDSSpec constructor
- <3> 10/13/94 TMH added methods to access directory info
- <2> 9/27/94 TMH added CUnpackedDSSpec assignment operator
- <1> 9/20/94 TMH Abandon RoadsideRest embrace Mercury
- <2> 9/9/94 TMH added constructor to CUnpackedDSSpec
- 6/10/94 TMH xxx put comment here xxx
-
- To Do:
- */
-
- #ifndef __CDSSpec__
- #define __CDSSpec__
-
- #ifndef __OCE__
- #include "OCE.h"
- #endif
-
- #ifndef __OCEMESSAGING__
- #include "OCEMessaging.h"
- #endif
-
-
- #ifndef __CRecordID__
- #include "CRecordID.h"
- #endif
-
-
-
- //----------------------------------------
- // C U n p a c k e d D S S p e c
- //----------------------------------------
-
- enum
- {
- asString,
- asLong,
- asShort,
- asBoolean
- };
-
- // This version uses the storage of the packed dsspec
- // CDSSpec allocates new storage for the the DSSpec. Ah isn't AOCE fun.
-
- class CUnpackedDSSpec {
- public:
- CUnpackedDSSpec(OCEPackedRecipient* packedRecipient);
- CUnpackedDSSpec() { fEntitySpecifier = &fEntity; };
-
-
- CUnpackedDSSpec& operator =(OCEPackedRecipient* packedRecipient);
-
- RecordID* fEntitySpecifier;
- OSType fExtType;
- unsigned short fExtSize;
- Ptr fExtValue;
- RecordID fEntity;
-
- StringPtr EntityName() { return (StringPtr)*(CRString*)fEntity.local.recordName; };
- StringPtr ExtValue();
- StringPtr ExtValue(short asType, Ptr buffer);
-
- CreationID CID() { return fEntitySpecifier->local.cid; };
- CDirectoryName& DirName() { return ((CPackedRLI*)fEntitySpecifier->rli)->fDirectoryName; }; // sleaze.
-
- };
-
-
-
- //---------------------------------
- // C D S S p e c
- //---------------------------------
-
- class CDSSpec {
- public:
- CDSSpec(StringPtr name,StringPtr dirName,OSType extType,StringPtr extValue );
- CDSSpec(CRecordName& name,StringPtr dirName,OSType extType,StringPtr extValue );
- CDSSpec(OCEPackedRecipient* packedRecipient);
- CDSSpec(StringPtr name,CDirectoryName& dirName,OSType extType,StringPtr extValue);
-
- CRecordID* fEntitySpecifier;
- OSType fExtType;
- unsigned short fExtSize;
- Ptr fExtValue;
-
- CRecordID fEntity;
- CRString256 _fExtValue;
-
- StringPtr EntityName() {return (StringPtr)*fEntity.fName; }
- StringPtr ExtValue(){ return (StringPtr)_fExtValue; }
-
- };
-
-
-
- #endif __CDSSpec__
-